package com.bjdd.jdy.ui.Emergency;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.bjdd.jdy.Constant;
import com.bjdd.jdy.R;
import com.bjdd.jdy.base.BaseActivity;
import com.bjdd.jdy.util.JumpUtil;
import com.bjdd.jdy.util.StatusBarUtil;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class EmergencyActivity extends BaseActivity<EmergencyPresenter, EmergencyModel> implements EmergencyContract.View {


    @Bind(R.id.toolbar_back)
    ImageView toolbarBack;
    @Bind(R.id.title)
    TextView title;
    @Bind(R.id.btn_call)
    Button btnCall;

    @Override
    public int getLayoutId() {
        return R.layout.activity_emergency;
    }

    @Override
    public void initView() {
        StatusBarUtil.setColor(this,getResources().getColor(R.color.toolbar_bg),0);
        title.setText("应急中心");
    }


    @OnClick({R.id.toolbar_back, R.id.btn_call})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.toolbar_back:
                finish();
                break;
            case R.id.btn_call:
                String phone = Constant.CALL_PHONE;
                JumpUtil.toCall(context,phone);
                break;
        }
    }
}
